class Timetables::Provisional < ApplicationRecord
  belongs_to :company
  belongs_to :course
  belongs_to :store
  belongs_to :coach
  enum status: {ready: 1, suspended: 8}

  after_destroy do
    Curriculum::Schedule.where(slice(:coach_id, :class_start_time, :class_end_time)).delete_all
  end
end
